diff options
| author | Dawid Rycerz <dawid@rycerz.xyz> | 2025-07-03 13:59:59 +0300 |
|---|---|---|
| committer | Dawid Rycerz <dawid@rycerz.xyz> | 2025-07-03 13:59:59 +0300 |
| commit | 4b9018b6d92ef8f1854d9dc44625295c2acd3fb3 (patch) | |
| tree | 10e01ec849c7439befd0a21f04021213e98d0f94 /src/pages/micro/[...slug].astro | |
| parent | f100d259d2ffebe61fef56ea3964f6d534d598c8 (diff) | |
Cleanup old notes feature
Diffstat (limited to 'src/pages/micro/[...slug].astro')
| -rw-r--r-- | src/pages/micro/[...slug].astro | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/src/pages/micro/[...slug].astro b/src/pages/micro/[...slug].astro index 54f6234..4cfae32 100644 --- a/src/pages/micro/[...slug].astro +++ b/src/pages/micro/[...slug].astro @@ -6,15 +6,10 @@ import PageLayout from "@/layouts/Base.astro"; // if you're using an adaptor in SSR mode, getStaticPaths wont work -> https://docs.astro.build/en/guides/routing/#modifying-the-slug-example-for-ssr export const getStaticPaths = (async () => { - // Get both local notes and Pleroma posts - const [allNotes, allMicro] = await Promise.all([ - getCollection("note"), - getCollection("micro").catch(() => []), // Fallback to empty array if micro collection fails - ]); + // Get only Pleroma posts + const allMicro = await getCollection("micro").catch(() => []); // Fallback to empty array if micro collection fails - const allPosts = [...allNotes, ...allMicro]; - - return allPosts.map((post) => ({ + return allMicro.map((post) => ({ params: { slug: post.id }, props: { note: post }, // Keep 'note' name for compatibility with existing component })); |
